<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>dfp_api.Utils</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="dfp_api-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/google-api-dfp-python/">DFP API Python Client Library</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="dfp_api-module.html">Package&nbsp;dfp_api</a> ::
        Module&nbsp;Utils
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="dfp_api.Utils-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module Utils</h1><p class="nomargin-top"><span class="codelink"><a href="dfp_api.Utils-pysrc.html">source&nbsp;code</a></span></p>
<p>Handy utility functions.</p>

<hr />
<div class="fields">      <p><strong>Author:</strong>
        api.sgrinberg@gmail.com (Stan Grinberg)
      </p>
</div><!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#ReadFile" class="summary-sig-name">ReadFile</a>(<span class="summary-sig-arg">f_path</span>)</span><br />
      Load data from a given file.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#ReadFile">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#GetDataFromCsvFile" class="summary-sig-name">GetDataFromCsvFile</a>(<span class="summary-sig-arg">file_name</span>)</span><br />
      Get data from CSV file, given name of the file from &quot;dfp_api/data&quot;.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetDataFromCsvFile">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#GetCurrencies" class="summary-sig-name">GetCurrencies</a>()</span><br />
      Get a list of available currencies.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetCurrencies">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#GetTimezones" class="summary-sig-name">GetTimezones</a>()</span><br />
      Get a list of available timezones.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetTimezones">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#PurgeLogs" class="summary-sig-name">PurgeLogs</a>(<span class="summary-sig-arg">logs_home</span>)</span><br />
      Clear all logs generated by this client library.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#PurgeLogs">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#PurgeLog" class="summary-sig-name">PurgeLog</a>(<span class="summary-sig-arg">log</span>)</span><br />
      Clear content of a given log file.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#PurgeLog">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#GetErrorFromHtml" class="summary-sig-name">GetErrorFromHtml</a>(<span class="summary-sig-arg">data</span>)</span><br />
      Return error message from HTML page.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetErrorFromHtml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#IsHtml" class="summary-sig-name">IsHtml</a>(<span class="summary-sig-arg">data</span>)</span><br />
      Return True if data is HTML, False otherwise.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#IsHtml">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#DecodeNonASCIIText" class="summary-sig-name">DecodeNonASCIIText</a>(<span class="summary-sig-arg">text</span>,
        <span class="summary-sig-arg">encoding</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">utf-8</code><code class="variable-quote">'</code></span>)</span><br />
      Decode a non-ASCII text into a unicode, using given encoding.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#DecodeNonASCIIText">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#MakeTextXMLReady" class="summary-sig-name">MakeTextXMLReady</a>(<span class="summary-sig-arg">text</span>)</span><br />
      Convert given text into an XML ready text.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#MakeTextXMLReady">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#__ParseUrl" class="summary-sig-name" onclick="show_private();">__ParseUrl</a>(<span class="summary-sig-arg">url</span>)</span><br />
      Parse URL into components.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#__ParseUrl">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#GetSchemeFromUrl" class="summary-sig-name">GetSchemeFromUrl</a>(<span class="summary-sig-arg">url</span>)</span><br />
      Return scheme portion of the URL.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetSchemeFromUrl">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#GetNetLocFromUrl" class="summary-sig-name">GetNetLocFromUrl</a>(<span class="summary-sig-arg">url</span>)</span><br />
      Return netloc portion of the URL.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetNetLocFromUrl">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#GetPathFromUrl" class="summary-sig-name">GetPathFromUrl</a>(<span class="summary-sig-arg">url</span>)</span><br />
      Return path portion of the URL.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetPathFromUrl">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#GetServerFromUrl" class="summary-sig-name">GetServerFromUrl</a>(<span class="summary-sig-arg">url</span>)</span><br />
      Return reconstructed scheme and netloc portion of the URL.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetServerFromUrl">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#GetVersionFromUrl" class="summary-sig-name">GetVersionFromUrl</a>(<span class="summary-sig-arg">url</span>)</span><br />
      Return API version portion of the URL.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetVersionFromUrl">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#GetAuthToken" class="summary-sig-name">GetAuthToken</a>(<span class="summary-sig-arg">email</span>,
        <span class="summary-sig-arg">password</span>)</span><br />
      Return an authentication token for Google Account.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetAuthToken">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#GetCurrentFuncName" class="summary-sig-name">GetCurrentFuncName</a>()</span><br />
      Return current function/method name.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetCurrentFuncName">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#UnLoadDictKeys" class="summary-sig-name">UnLoadDictKeys</a>(<span class="summary-sig-arg">dct</span>,
        <span class="summary-sig-arg">keys_lst</span>)</span><br />
      Return newly built dictionary with out the keys in keys_lst.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#UnLoadDictKeys">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#CleanUpDict" class="summary-sig-name">CleanUpDict</a>(<span class="summary-sig-arg">dct</span>)</span><br />
      Return newly built dictionary with out the keys that point to no values.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#CleanUpDict">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#BoolTypeConvert" class="summary-sig-name">BoolTypeConvert</a>(<span class="summary-sig-arg">bool_type</span>)</span><br />
      Convert bool to local bool and vice versa.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#BoolTypeConvert">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#LastStackTrace" class="summary-sig-name">LastStackTrace</a>()</span><br />
      Fetch last stack traceback.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#LastStackTrace">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#HtmlUnescape" class="summary-sig-name">HtmlUnescape</a>(<span class="summary-sig-arg">text</span>)</span><br />
      Removes HTML or XML character references and entities from a text string.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#HtmlUnescape">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#CsvEscape" class="summary-sig-name">CsvEscape</a>(<span class="summary-sig-arg">text</span>)</span><br />
      Escapes data entry for consistency with CSV format.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#CsvEscape">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.Utils-module.html#GetAllEntitiesByStatement" class="summary-sig-name">GetAllEntitiesByStatement</a>(<span class="summary-sig-arg">client</span>,
        <span class="summary-sig-arg">service_name</span>,
        <span class="summary-sig-arg">query</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">page_size</span>=<span class="summary-sig-default">500</span>,
        <span class="summary-sig-arg">server</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">https://sandbox.google.com</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">version</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">v201004</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">http_proxy</span>=<span class="summary-sig-default">None</span>)</span><br />
      Get all existing entities by statement.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetAllEntitiesByStatement">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="ReadFile"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">ReadFile</span>(<span class="sig-arg">f_path</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#ReadFile">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Load data from a given file.

Args:
  f_path: str absolute path to the file to read.

Returns:
  str data loaded from the file, None otherwise.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="GetDataFromCsvFile"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">GetDataFromCsvFile</span>(<span class="sig-arg">file_name</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetDataFromCsvFile">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Get data from CSV file, given name of the file from &quot;dfp_api/data&quot;.

Args:
  file_name: str file name.

Returns:
  list data from CSV file.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="GetCurrencies"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">GetCurrencies</span>()</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetCurrencies">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Get a list of available currencies.

Returns:
  list available currencies.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="GetTimezones"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">GetTimezones</span>()</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetTimezones">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Get a list of available timezones.

Returns:
  list available timezones.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="PurgeLogs"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">PurgeLogs</span>(<span class="sig-arg">logs_home</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#PurgeLogs">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Clear all logs generated by this client library.

This will remove all stored SOAP XML and units data.

WARNING: This will remove all data from the logs generated by the client
library.

Args:
  logs_home: str absolute path to logs directory.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="PurgeLog"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">PurgeLog</span>(<span class="sig-arg">log</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#PurgeLog">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Clear content of a given log file.

If the file cannot be opened, Error is raised.

Args:
  log: str absolute path to a log file.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="GetErrorFromHtml"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">GetErrorFromHtml</span>(<span class="sig-arg">data</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetErrorFromHtml">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Return error message from HTML page.

Args:
  data: str HTML data.

Returns:
  str error message.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="IsHtml"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">IsHtml</span>(<span class="sig-arg">data</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#IsHtml">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Return True if data is HTML, False otherwise.

Args:
  data: str data to check.

Returns:
  bool True if data is HTML, False otherwise.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="DecodeNonASCIIText"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">DecodeNonASCIIText</span>(<span class="sig-arg">text</span>,
        <span class="sig-arg">encoding</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">utf-8</code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#DecodeNonASCIIText">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Decode a non-ASCII text into a unicode, using given encoding.

A full list of supported encodings is available at
http://docs.python.org/lib/standard-encodings.html. If unable to find given
encoding, Error is raised.

Args:
  text: str a text to encode.
  [optional]
  encoding: str an encoding to use.

Returns:
  tuple decoded text with the text length, (text, len(text)).

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="MakeTextXMLReady"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">MakeTextXMLReady</span>(<span class="sig-arg">text</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#MakeTextXMLReady">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Convert given text into an XML ready text.

XML ready text with all non-ASCII characters properly decoded.

Args:
  text: str a text to convert.

Returns:
  str converted text.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="__ParseUrl"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__ParseUrl</span>(<span class="sig-arg">url</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#__ParseUrl">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Parse URL into components.

Args:
  url: str a URL to parse.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="GetSchemeFromUrl"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">GetSchemeFromUrl</span>(<span class="sig-arg">url</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetSchemeFromUrl">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Return scheme portion of the URL.

Args:
  url: str a URL to parse.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="GetNetLocFromUrl"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">GetNetLocFromUrl</span>(<span class="sig-arg">url</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetNetLocFromUrl">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Return netloc portion of the URL.

Args:
  url: str a URL to parse.

Returns:
  str: netloc portion of the URL.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="GetPathFromUrl"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">GetPathFromUrl</span>(<span class="sig-arg">url</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetPathFromUrl">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Return path portion of the URL.

Args:
  url: str a URL to parse.

Returns:
  str: path portion of the URL.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="GetServerFromUrl"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">GetServerFromUrl</span>(<span class="sig-arg">url</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetServerFromUrl">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Return reconstructed scheme and netloc portion of the URL.

Args:
  url: str a URL to parse.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="GetVersionFromUrl"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">GetVersionFromUrl</span>(<span class="sig-arg">url</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetVersionFromUrl">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Return API version portion of the URL.

Args:
  url: str a URL to parse.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="GetAuthToken"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">GetAuthToken</span>(<span class="sig-arg">email</span>,
        <span class="sig-arg">password</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetAuthToken">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Return an authentication token for Google Account.

If an error occurs, AuthTokenError is raised.

Args:
  email: str Google Account's login email.
  password: str Google Account's password.

Returns:
  str authentication token for Google Account.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="GetCurrentFuncName"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">GetCurrentFuncName</span>()</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetCurrentFuncName">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Return current function/method name.

Returns:
  str current function/method name.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="UnLoadDictKeys"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">UnLoadDictKeys</span>(<span class="sig-arg">dct</span>,
        <span class="sig-arg">keys_lst</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#UnLoadDictKeys">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Return newly built dictionary with out the keys in keys_lst.

Args:
  dct: dict a dictionary to unload keys from.
  keys_lst: list a list of keys to unload from a dictionary.

Returns:
  dict a new dictionary with out given keys.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="CleanUpDict"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">CleanUpDict</span>(<span class="sig-arg">dct</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#CleanUpDict">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Return newly built dictionary with out the keys that point to no values.

Args:
  dct: dict a dictionary to clean up.

Returns:
  dict a new dictionary with out empty keys.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="BoolTypeConvert"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">BoolTypeConvert</span>(<span class="sig-arg">bool_type</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#BoolTypeConvert">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Convert bool to local bool and vice versa.

Args:
  bool_type: bool or str a type to convert (i.e. True&lt;=&gt;'y', False&lt;=&gt;'n',
             'true'=&gt;True, 'false'=&gt;False).

Returns:
  bool or str converted type.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="LastStackTrace"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">LastStackTrace</span>()</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#LastStackTrace">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Fetch last stack traceback.

Returns:
  str last stack traceback.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="HtmlUnescape"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">HtmlUnescape</span>(<span class="sig-arg">text</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#HtmlUnescape">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Removes HTML or XML character references and entities from a text string.

See http://effbot.org/zone/re-sub.htm#unescape-html.

Args:
  text: str the HTML (or XML) source text.

Returns:
  str/unicode plain text, as a Unicode string, if necessary.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="CsvEscape"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">CsvEscape</span>(<span class="sig-arg">text</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#CsvEscape">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Escapes data entry for consistency with CSV format.

The CSV format rules:
  - Fields with embedded commas must be enclosed within double-quote
    characters.
  - Fields with embedded double-quote characters must be enclosed within
    double-quote characters, and each of the embedded double-quote characters
    must be represented by a pair of double-quote characters.
  - Fields with embedded line breaks must be enclosed within double-quote
    characters.
  - Fields with leading or trailing spaces must be enclosed within
    double-quote characters.

Args:
  text: str data entry.

Returns:
  str a CSV encoded data entry.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="GetAllEntitiesByStatement"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">GetAllEntitiesByStatement</span>(<span class="sig-arg">client</span>,
        <span class="sig-arg">service_name</span>,
        <span class="sig-arg">query</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">page_size</span>=<span class="sig-default">500</span>,
        <span class="sig-arg">server</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">https://sandbox.google.com</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">version</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">v201004</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">http_proxy</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.Utils-pysrc.html#GetAllEntitiesByStatement">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Get all existing entities by statement.

All existing entities are retrived for a given statement and page size. The
retrieval of entities works across all services. Thus, the same method can
be used to fetch companies, creatives, ad units, line items, etc. The results,
even if they span multiple pages, are grouped into a single list of entities.

Args:
  client: Client an instance of Client.
  service_name: str name of the service to use.
  [optional]
  query: str a statement filter to apply, if any. The default is empty string.
  page_size: int size of the page to use. If page size is less than 0 or
             greater than 500, defaults to 500.
  server: str API server to access for this API call. Possible values
            are: 'https://www.google.com' for live site and
            'https://sandbox.google.com' for sandbox. The default behavior is
            to access sandbox site.
  version: str API version to use.
  http_proxy: str HTTP proxy to use.

Returns:
  list a list of existing entities.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="dfp_api-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/google-api-dfp-python/">DFP API Python Client Library</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
